global class scheduledupdateAccountType implements Schedulable{

  public static ID AccountRecordType = RecordTypeHelper.GetRecordTypeID('Account', 'Local OOR Customer');
 
 /*To schedule it every day at 2 am execute below commands
 
  public static String CRON_EXP0  = '0 0 2 * * ?';
  
  scheduledupdateAccountType s0 = new scheduledupdateAccountType();     
  String sch0 = scheduledupdateAccountType.CRON_EXP0;     
  System.schedule('Schedule Batch Account update at 2:00am daily', sch0, s0);  
  */
  global void execute(SchedulableContext sc) {
  
  accountTypeUpdate acntupdate = new accountTypeUpdate();
  acntupdate.query = 'SELECT id,Ownerid, name, Type__c, AFrontier_CustomerID__c, Renewal_Date__c, Account_Status__c, Contract_Status__c from Account where recordtypeid =\'' + AccountRecordType + '\' and AFrontier_CustomerID__c != null and Renewal_Date__c != null '; 
  acntupdate.email= 'bhumika.udani@accenture.com';
  ID batchprocessid = Database.executeBatch(acntupdate,200);
   }
   /* test class for classes/triggers */  
   
    static testMethod void testscheduledupdateAccountType() {
      test.starttest();       
       scheduledupdateAccountType  sat = new scheduledupdateAccountType();
       String at = '0 0 23 * * ?';        
       system.schedule('Scheduled Sharkpool', at, sat);
       test.stopTest();
       }  
}